<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>CreateSprite</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">CreateSprite()</font></b></p>
<p><b>Syntax</b></p><blockquote>

Result = <font color="#006666"><b>CreateSprite</b></font>(#Sprite, Width, Height [, Mode])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>



Creates an empty sprite with the specified dimensions. <a href="spriteoutput.html">SpriteOutput()</a> can be used 
to draw on the sprite. 

 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Sprite</i></td>
<td width="90%"> 
 
A number to identify the new sprite. <a href="../reference/purebasic_objects.html">#PB_Any</a> can 
be used to auto-generate this number. 

 

</td></tr>
<tr><td><i>Width, Height</i></td>
<td> 
 
The size of the new sprite (in pixels). 

 

</td></tr>
<tr><td><i>Mode (optional)</i></td>
<td> 
 
It can be a combination of the following values (with the '|' operator): 
 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Sprite_PixelCollision</font>: Add special information to handle pixel collision trough <a href="spritepixelcollision.html">SpritePixelCollision()</a>.
  <font color="#924B72">#PB_Sprite_AlphaBlending</font> : Sprite is created with per pixel alpha-channel support, needed for <a href="displaytransparentsprite.html">DisplayTransparentSprite()</a>.
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>



Nonzero if the sprite has been created, zero otherwise. If <font color="#924B72">#PB_Any</font> was used 
for the #Sprite parameter then the generated number is returned on success. 

 

</blockquote><p><b>See Also</b></p><blockquote>

<a href="spriteoutput.html">SpriteOutput()</a> 

</Blockquote><p><b>Supported OS  </b><Blockquote>All</Blockquote></p><center>&lt;- <a href=copysprite.html>CopySprite()</a> - <a href=index.html>Sprite Index</a> - <a href=displaysprite.html>DisplaySprite()</a> -&gt;



</body></html>